package io.renren.modules.sp.dao;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.renren.common.dao.BaseDao;
import io.renren.modules.sp.dto.SpMatchItemTeamDTO;
import io.renren.modules.sp.entity.SpMatchItemTeamEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
* 参赛队
*
* @author whc 15953295779@126.com
* @since 3.0 2023-04-21
*/
@Mapper
public interface SpMatchItemTeamDao extends BaseDao<SpMatchItemTeamEntity> {
    IPage<SpMatchItemTeamEntity> selectPageVo(Page page, @Param(Constants.WRAPPER) QueryWrapper<SpMatchItemTeamDTO> wrapper);

    IPage<Map<String,Object>> signRecord(Page page, @Param(Constants.WRAPPER)  Map<String,Object> param);
    IPage<Map<String,Object>> signRecordRise(Page page, @Param(Constants.WRAPPER)  Map<String,Object> param);

    IPage<Map<String,Object>> groupCount(Page page, @Param(Constants.WRAPPER)  Map<String,Object> param);

    IPage<Map<String,Object>> queryCertificate(Page page, @Param(Constants.WRAPPER)  Map<String,Object> param);

    IPage<Map<String,Object>> matchScoreRecord(Page page, @Param(Constants.WRAPPER)  Map<String,Object> param);

    IPage<Map<String,Object>> signRecordTeam(Page page, @Param(Constants.WRAPPER)  Map<String,Object> param);
    IPage<Map<String,Object>> signRecordStudent(Page page, @Param(Constants.WRAPPER)  Map<String,Object> param);
    IPage<Map<String,Object>> finishStudent(Page page, @Param(Constants.WRAPPER)  Map<String,Object> param);
    IPage<Map<String,Object>> signRecordTeacher(Page page, @Param(Constants.WRAPPER)  Map<String,Object> param);
    IPage<Map<String,Object>> exportTeacher(Page page, @Param(Constants.WRAPPER)  Map<String,Object> param);
    List<Map<String,Object>> queryTeacherBy(Long userId, String matchItemId);

    IPage<Map<String,Object>> queryNoTicketUser(Page page, @Param(Constants.WRAPPER)  Map<String,Object> param);

    IPage<Map<String,Object>> exportCerLog(Page page, @Param(Constants.WRAPPER)  Map<String,Object> param);

    void cancleRanks(Long id);

    List<Map<String,Object>> queryTeamUserByUserId(Long userId, Long matchId);

    List<Map<String,Object>> queryTeacherByMatchItemTeamId(Long matchItemTeamId);

    String queryTeacherGroup(Long userId, Long matchItemId);

    void ranksSortSingle(@Param(Constants.WRAPPER) Map<String,Object> param);

    void ranksSortSingleProgram(@Param(Constants.WRAPPER) Map<String,Object> param);

    void ranksSortTeam(@Param(Constants.WRAPPER) Map<String,Object> param);
    void ranksSortTeamFqwd(@Param(Constants.WRAPPER) Map<String,Object> param);

    List<Map<String,Object>> queryAllItemGroup(Long matchId);

    IPage<Map<String,Object>> signRecordAll(Page page, @Param(Constants.WRAPPER)  Map<String,Object> param);

    void clearAllRemark(Long id);

}
